package com.kerwin.entity.returnjson;

public enum E {
    SUC(200,"ok"),
    ERROR(500,"error"),
    COVER_THE_BOTTOM(999,"啊，我还没写这个异常"),
    /*自定义异常*/
    /*比如文件未找到异常 空指针以后*/
    NO_LOGIN(500401,"noLogin"),
    LOGIN_FAIL(500402,"用户名或密码错误"),
    NO_FIND(500404,"noFind"),
    JSON_ERROR(10001,"json出错，可能是不能序列化之类的"),
    REDIS_NO_FIND(10002,"redis里面没有取到数据"),
    ;

    private Integer code;
    private String msg;

    E(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
